package com.example.ythhome.login.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 菜单表
 * @TableName t_menu
 */
@TableName(value ="t_menu")
@Data
public class Menu implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.ASSIGN_ID)
    @TableField(value = "menu_id")
    private Integer menuId;

    /**
     * 菜单类型（`0`代表菜单、`1`代表`iframe`、`2`代表外链、`3`代表按钮）
     */
    @TableField(value = "menu_type")
    private String menuType;

    /**
     * 
     */
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 菜单名称（兼容国际化、非国际化，如果用国际化的写法就必须在根目录的`locales`文件夹下对应添加） |
     */
    @TableField(value = "title")
    private String title;

    /**
     * 路由名称（必须唯一并且和当前路由`component`字段对应的页面里用`defineOptions`包起来的`name`保持一致） |
     */
    @TableField(value = "name")
    private String name;

    /**
     * 
     */
    @TableField(value = "path")
    private String path;

    /**
     * 组件路径（传`component`组件路径，那么`path`可以随便写，如果不传，`component`组件路径会跟`path`保持一致） |
     */
    @TableField(value = "component")
    private String component;

    /**
     * 菜单排序（平台规定只有`home`路由的`rank`才能为`0`，所以后端在返回`rank`的时候需要从非`0`开始 [点击查看更多](https://pure-admin.cn/pages/routerMenu/#%E8%8F%9C%E5%8D%95%E6%8E%92%E5%BA%8F-rank)） |
     */
    @TableField(value = "rank")
    private Integer rank;

    /**
     * 
     */
    @TableField(value = "redirect")
    private String redirect;

    /**
     * 
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * 
     */
    @TableField(value = "extraicon")
    private String extraicon;

    /**
     * 进场动画（页面加载动画）   
     */
    @TableField(value = "enter_transition")
    private String enterTransition;

    /**
     * 离场动画（页面加载动画）
     */
    @TableField(value = "leave_transition")
    private String leaveTransition;

    /**
     * 菜单激活（将某个菜单激活，主要用于通过`query`或`params`传参的路由，当它们通过配置`showLink: false`后不在菜单中显示，就不会有任何菜单高亮，而通过设置`activePath`指定激活菜单即可获得高亮，`activePath`为指定激活菜单的`path`） |
     */
    @TableField(value = "active_path")
    private String activePath;

    /**
     * 权限标识（按钮级别权限设置）  
     */
    @TableField(value = "auths")
    private String auths;

    /**
     * 链接地址（需要内嵌的`iframe`链接地址）   
     */
    @TableField(value = "frame_src")
    private String frameSrc;

    /**
     * 加载动画（内嵌的`iframe`页面是否开启首次加载动画） 
     */
    @TableField(value = "frame_loading")
    private String frameLoading;

    /**
     * 缓存页面（是否缓存该路由页面，开启后会保存该页面的整体状态，刷新后会清空状态） 
     */
    @TableField(value = "keep_alive")
    private String keepAlive;

    /**
     * 标签页（当前菜单名称或自定义信息禁止添加到标签页）  
     */
    @TableField(value = "hidden_tag")
    private String hiddenTag;

    /**
     * 固定标签页（当前菜单名称是否固定显示在标签页且不可关闭）     
     */
    @TableField(value = "fixed_tag")
    private String fixedTag;

    /**
     * 菜单（是否显示该菜单）  
     */
    @TableField(value = "show_link")
    private String showLink;

    /**
     * 父级菜单（是否显示父级菜单 [点击查看更多](https://pure-admin.cn/pages/routerMenu/#%E7%AC%AC%E4%B8%80%E7%A7%8D-%E8%AF%A5%E6%A8%A1%E5%BC%8F%E9%92%88%E5%AF%B9%E7%88%B6%E7%BA%A7%E8%8F%9C%E5%8D%95%E4%B8%8B%E5%8F%AA%E6%9C%89%E4%B8%80%E4%B8%AA%E5%AD%90%E8%8F%9C%E5%8D%95%E7%9A%84%E6%83%85%E5%86%B5-%E5%9C%A8%E5%AD%90%E8%8F%9C%E5%8D%95%E7%9A%84-meta-%E5%B1%9E%E6%80%A7%E4%B8%AD%E5%8A%A0%E4%B8%8A-showparent-true-%E5%8D%B3%E5%8F%AF)） |
     */
    @TableField(value = "show_parent")
    private String showParent;

    /**
     * 
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 
     */
    @TableField(value = "create_author")
    private String createAuthor;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Menu other = (Menu) that;
        return (this.getMenuId() == null ? other.getMenuId() == null : this.getMenuId().equals(other.getMenuId()))
            && (this.getMenuType() == null ? other.getMenuType() == null : this.getMenuType().equals(other.getMenuType()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
            && (this.getComponent() == null ? other.getComponent() == null : this.getComponent().equals(other.getComponent()))
            && (this.getRank() == null ? other.getRank() == null : this.getRank().equals(other.getRank()))
            && (this.getRedirect() == null ? other.getRedirect() == null : this.getRedirect().equals(other.getRedirect()))
            && (this.getIcon() == null ? other.getIcon() == null : this.getIcon().equals(other.getIcon()))
            && (this.getExtraicon() == null ? other.getExtraicon() == null : this.getExtraicon().equals(other.getExtraicon()))
            && (this.getEnterTransition() == null ? other.getEnterTransition() == null : this.getEnterTransition().equals(other.getEnterTransition()))
            && (this.getLeaveTransition() == null ? other.getLeaveTransition() == null : this.getLeaveTransition().equals(other.getLeaveTransition()))
            && (this.getActivePath() == null ? other.getActivePath() == null : this.getActivePath().equals(other.getActivePath()))
            && (this.getAuths() == null ? other.getAuths() == null : this.getAuths().equals(other.getAuths()))
            && (this.getFrameSrc() == null ? other.getFrameSrc() == null : this.getFrameSrc().equals(other.getFrameSrc()))
            && (this.getFrameLoading() == null ? other.getFrameLoading() == null : this.getFrameLoading().equals(other.getFrameLoading()))
            && (this.getKeepAlive() == null ? other.getKeepAlive() == null : this.getKeepAlive().equals(other.getKeepAlive()))
            && (this.getHiddenTag() == null ? other.getHiddenTag() == null : this.getHiddenTag().equals(other.getHiddenTag()))
            && (this.getFixedTag() == null ? other.getFixedTag() == null : this.getFixedTag().equals(other.getFixedTag()))
            && (this.getShowLink() == null ? other.getShowLink() == null : this.getShowLink().equals(other.getShowLink()))
            && (this.getShowParent() == null ? other.getShowParent() == null : this.getShowParent().equals(other.getShowParent()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateAuthor() == null ? other.getCreateAuthor() == null : this.getCreateAuthor().equals(other.getCreateAuthor()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMenuId() == null) ? 0 : getMenuId().hashCode());
        result = prime * result + ((getMenuType() == null) ? 0 : getMenuType().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPath() == null) ? 0 : getPath().hashCode());
        result = prime * result + ((getComponent() == null) ? 0 : getComponent().hashCode());
        result = prime * result + ((getRank() == null) ? 0 : getRank().hashCode());
        result = prime * result + ((getRedirect() == null) ? 0 : getRedirect().hashCode());
        result = prime * result + ((getIcon() == null) ? 0 : getIcon().hashCode());
        result = prime * result + ((getExtraicon() == null) ? 0 : getExtraicon().hashCode());
        result = prime * result + ((getEnterTransition() == null) ? 0 : getEnterTransition().hashCode());
        result = prime * result + ((getLeaveTransition() == null) ? 0 : getLeaveTransition().hashCode());
        result = prime * result + ((getActivePath() == null) ? 0 : getActivePath().hashCode());
        result = prime * result + ((getAuths() == null) ? 0 : getAuths().hashCode());
        result = prime * result + ((getFrameSrc() == null) ? 0 : getFrameSrc().hashCode());
        result = prime * result + ((getFrameLoading() == null) ? 0 : getFrameLoading().hashCode());
        result = prime * result + ((getKeepAlive() == null) ? 0 : getKeepAlive().hashCode());
        result = prime * result + ((getHiddenTag() == null) ? 0 : getHiddenTag().hashCode());
        result = prime * result + ((getFixedTag() == null) ? 0 : getFixedTag().hashCode());
        result = prime * result + ((getShowLink() == null) ? 0 : getShowLink().hashCode());
        result = prime * result + ((getShowParent() == null) ? 0 : getShowParent().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateAuthor() == null) ? 0 : getCreateAuthor().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", menuId=").append(menuId);
        sb.append(", menuType=").append(menuType);
        sb.append(", parentId=").append(parentId);
        sb.append(", title=").append(title);
        sb.append(", name=").append(name);
        sb.append(", path=").append(path);
        sb.append(", component=").append(component);
        sb.append(", rank=").append(rank);
        sb.append(", redirect=").append(redirect);
        sb.append(", icon=").append(icon);
        sb.append(", extraicon=").append(extraicon);
        sb.append(", enterTransition=").append(enterTransition);
        sb.append(", leaveTransition=").append(leaveTransition);
        sb.append(", activePath=").append(activePath);
        sb.append(", auths=").append(auths);
        sb.append(", frameSrc=").append(frameSrc);
        sb.append(", frameLoading=").append(frameLoading);
        sb.append(", keepAlive=").append(keepAlive);
        sb.append(", hiddenTag=").append(hiddenTag);
        sb.append(", fixedTag=").append(fixedTag);
        sb.append(", showLink=").append(showLink);
        sb.append(", showParent=").append(showParent);
        sb.append(", remark=").append(remark);
        sb.append(", createTime=").append(createTime);
        sb.append(", createAuthor=").append(createAuthor);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}